﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model
{
    /// <summary>
    /// 会员下的券信息
    /// </summary>
    public class VipCouponInfoModel
    {
        /// <summary>
        /// id
        /// </summary>
        public string couponInfoId { get; set; }
        /// <summary>
        /// 租户ID
        /// </summary>
        public string tenantId { get; set; }
        /// <summary>
        /// 组织
        /// </summary>
        public string organizationId { get; set; }
        /// <summary>
        /// 券码
        /// </summary>
        public string couponNo { get; set; }
        /// <summary>
        /// 外部券码
        /// </summary>
        public string outerCouponNo { get; set; }
        /// <summary>
        /// 优惠券名称
        /// </summary>
        public string couponName { get; set; }
        /// <summary>
        /// 券面额
        /// </summary>
        public decimal amount { get; set; }
        /// <summary>
        /// 商家实收
        /// </summary>
        public decimal amountFact { get; set; }
        /// <summary>
        /// 核销门槛
        /// </summary>
        public decimal verifyAmount { get; set; }
        /// <summary>
        /// 最高抵用金额
        /// </summary>
        public decimal maxDiscountAmount { get; set; }
        /// <summary>
        /// 有效期开始
        /// </summary>
        public string couponBeginDate { get; set; }
        /// <summary>
        /// 有效期结束
        /// </summary>
        public string couponEndDate { get; set; }
        /// <summary>
        /// 券状态 1 制券 2 已发放 3 已核销 4 已锁定 5 作废
        /// </summary>
        public string couponStatus { get; set; }
        /// <summary>
        /// 得到名称
        /// </summary>
        /// <returns></returns>
        public string GetCouponStatusName()
        {
            switch (couponStatus)
            {
                case "1":
                    return "制券";
                case "2":
                    return "已发放";
                case "3":
                    return "已核销";
                case "4":
                    return "已锁定";
                case "5":
                    return "作废";
                default:
                    return "未知";
            }
        }
        /// <summary>
        /// 发券日期
        /// </summary>
        public string couponDate { get; set; }
        /// <summary>
        /// 核销时间
        /// </summary>
        public string verifyDate { get; set; }
        /// <summary>
        /// 券批次id
        /// </summary>
        public string couponBatchId { get; set; }
        /// <summary>
        /// 批量制券id
        /// </summary>
        public string couponBatchCreateId { get; set; }
        /// <summary>
        /// 优惠券类型券类型 1 售卖券 2 满减券 3 折扣券 4 运费券 5 商品券
        /// </summary>
        public string couponTypeId { get; set; }
        /// <summary>
        /// 券类型名称GlobalEnumVars.CouponType
        /// </summary>
        /// <returns></returns>
        public string GetCouponTypeName()
        {
            switch (couponTypeId)
            {
                case "1":
                    return "售卖券";
                case "2":
                    return "满减券";
                case "3":
                    return "折扣券";
                case "4":
                    return "运费券";
                case "5":
                    return "商品券";
                default:
                    return "未知类型";
            }
        }
        /// <summary>
        /// 券分类
        /// </summary>
        public string couponSortId { get; set; }
        /// <summary>
        /// 适用渠道 0全部 1线下 2线上
        /// </summary>
        public string couponChannelId { get; set; }
        /// <summary>
        /// 得到使用渠道名称
        /// </summary>
        /// <returns></returns>
        public string GetCouponChannelName()
        {
            switch (couponChannelId)
            {
                case "0":
                    return "全部";
                case "1":
                    return "线下";
                case "2":
                    return "线上";
                case "3":
                    return "通用";
                default:
                    return "未知渠道";
            }
        }
        /// <summary>
        /// 券来源渠道
        /// </summary>
        public string couponSourceChannelId { get; set; }
        /// <summary>
        /// 商品适用方式 1 全部商品 2 指定商品 3 排除商品,GlobalEnumVars.CouponItemWayType
        /// </summary>
        public int itemWayType { get; set; }
        /// <summary>
        /// 适用方式名称
        /// </summary>
        /// <returns></returns>
        public string GetItemWayTypeName()
        {
            switch (itemWayType)
            {
                case 1:
                    return "全部商品";
                case 2:
                    return "指定商品";
                case 3:
                    return "排除商品";
                default:
                    return "未知";
            }
        }
        /// <summary>
        /// 适用门店方式 1 全部门店 2 指定门店 3 排除门店
        /// </summary>
        public string branchWayType { get; set; }
        /// <summary>
        /// 门店方式名称
        /// </summary>
        /// <returns></returns>
        public string GetBranchWayTypeName()
        {
            switch (branchWayType)
            {
                case "1":
                    return "全部门店";
                case "2":
                    return "指定门店";
                case "3":
                    return "排除门店";
                default:
                    return "未知";
            }
        }
        /// <summary>
        /// 是否互斥 0 否 1 是
        /// </summary>
        public string exclusion { get; set; }
        /// <summary>
        /// 优惠券转赠 0 否 1 是
        /// </summary>
        public string gift { get; set; }
        /// <summary>
        /// 密码类型 0 固定密码 1 随机密码
        /// </summary>
        public string pwdType { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string password { get; set; }
        /// <summary>
        /// 商品列表
        /// </summary>
        public List<string> couponBatchSkuIdList { get; set; }
        /// <summary>
        /// 门店列表
        /// </summary>
        public List<string> couponBatchBranchList { get; set; }
    }
}
